3.30 \(\int \frac{(e x)^m \left (a+b x^n\right )^2 \left (A+B x^n\right )}{\left (c+d x^n\right )^2} \, dx\)

Optimal. Leaf size=267 \[ -\frac{(e x)^{m+1} (b c-a d) \, _2F_1\left (1,\frac{m+1}{n};\frac{m+n+1}{n};-\frac{d x^n}{c}\right ) (a d (B c (m+1)-A d (m-n+1))+b c (A d (m+n+1)-B c (m+2 n+1)))}{c^2 d^3 e (m+1) n}-\frac{b (e x)^{m+1} (2 a d (A d (m+1)-B c (m+n+1))-b c (A d (m+n+1)-B c (m+2 n+1)))}{c d^3 e (m+1) n}-\frac{(e x)^{m+1} \left (a+b x^n\right )^2 (B c-A d)}{c d e n \left (c+d x^n\right )}-\frac{b^2 x^{n+1} (e x)^m (A d (m+n+1)-B c (m+2 n+1))}{c d^2 n (m+n+1)} \]

[Out]

-((b^2*(A*d*(1 + m + n) - B*c*(1 + m + 2*n))*x^(1 + n)*(e*x)^m)/(c*d^2*n*(1 + m
+ n))) - (b*(2*a*d*(A*d*(1 + m) - B*c*(1 + m + n)) - b*c*(A*d*(1 + m + n) - B*c*
(1 + m + 2*n)))*(e*x)^(1 + m))/(c*d^3*e*(1 + m)*n) - ((B*c - A*d)*(e*x)^(1 + m)*
(a + b*x^n)^2)/(c*d*e*n*(c + d*x^n)) - ((b*c - a*d)*(a*d*(B*c*(1 + m) - A*d*(1 +
 m - n)) + b*c*(A*d*(1 + m + n) - B*c*(1 + m + 2*n)))*(e*x)^(1 + m)*Hypergeometr
ic2F1[1, (1 + m)/n, (1 + m + n)/n, -((d*x^n)/c)])/(c^2*d^3*e*(1 + m)*n)

_______________________________________________________________________________________

Rubi [A]  time = 1.6687, antiderivative size = 267, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.161 \[ -\frac{(e x)^{m+1} (b c-a d) \, _2F_1\left (1,\frac{m+1}{n};\frac{m+n+1}{n};-\frac{d x^n}{c}\right ) (a d (B c (m+1)-A d (m-n+1))+b c (A d (m+n+1)-B c (m+2 n+1)))}{c^2 d^3 e (m+1) n}-\frac{b (e x)^{m+1} (2 a d (A d (m+1)-B c (m+n+1))-b c (A d (m+n+1)-B c (m+2 n+1)))}{c d^3 e (m+1) n}-\frac{(e x)^{m+1} \left (a+b x^n\right )^2 (B c-A d)}{c d e n \left (c+d x^n\right )}-\frac{b^2 x^{n+1} (e x)^m (A d (m+n+1)-B c (m+2 n+1))}{c d^2 n (m+n+1)} \]

Antiderivative was successfully verified.

[In]  Int[((e*x)^m*(a + b*x^n)^2*(A + B*x^n))/(c + d*x^n)^2,x]

[Out]

-((b^2*(A*d*(1 + m + n) - B*c*(1 + m + 2*n))*x^(1 + n)*(e*x)^m)/(c*d^2*n*(1 + m
+ n))) - (b*(2*a*d*(A*d*(1 + m) - B*c*(1 + m + n)) - b*c*(A*d*(1 + m + n) - B*c*
(1 + m + 2*n)))*(e*x)^(1 + m))/(c*d^3*e*(1 + m)*n) - ((B*c - A*d)*(e*x)^(1 + m)*
(a + b*x^n)^2)/(c*d*e*n*(c + d*x^n)) - ((b*c - a*d)*(a*d*(B*c*(1 + m) - A*d*(1 +
 m - n)) + b*c*(A*d*(1 + m + n) - B*c*(1 + m + 2*n)))*(e*x)^(1 + m)*Hypergeometr
ic2F1[1, (1 + m)/n, (1 + m + n)/n, -((d*x^n)/c)])/(c^2*d^3*e*(1 + m)*n)

_______________________________________________________________________________________

Rubi in Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((e*x)**m*(a+b*x**n)**2*(A+B*x**n)/(c+d*x**n)**2,x)

[Out]

Timed out

_______________________________________________________________________________________

Mathematica [A]  time = 1.75341, size = 249, normalized size = 0.93 \[ x (e x)^m \left (-\frac{a^2 B c-a^2 A d}{c^2 d n+c d^2 n x^n}+\frac{(b c-a d) \, _2F_1\left (1,\frac{m+1}{n};\frac{m+n+1}{n};-\frac{d x^n}{c}\right ) (a d (A d (m-n+1)-B c (m+1))+b c (B c (m+2 n+1)-A d (m+n+1)))}{c^2 d^3 (m+1) n}+\frac{2 a b \left (-A d (m+1)+B c (m+n+1)+B d n x^n\right )}{d^2 (m+1) n \left (c+d x^n\right )}+\frac{b^2 \left (A d \left (\frac{c}{c n+d n x^n}+\frac{1}{m+1}\right )+B \left (-\frac{c^2}{c n+d n x^n}-\frac{2 c}{m+1}+\frac{d x^n}{m+n+1}\right )\right )}{d^3}\right ) \]

Antiderivative was successfully verified.

[In]  Integrate[((e*x)^m*(a + b*x^n)^2*(A + B*x^n))/(c + d*x^n)^2,x]

[Out]

x*(e*x)^m*((2*a*b*(-(A*d*(1 + m)) + B*c*(1 + m + n) + B*d*n*x^n))/(d^2*(1 + m)*n
*(c + d*x^n)) - (a^2*B*c - a^2*A*d)/(c^2*d*n + c*d^2*n*x^n) + (b^2*(A*d*((1 + m)
^(-1) + c/(c*n + d*n*x^n)) + B*((-2*c)/(1 + m) + (d*x^n)/(1 + m + n) - c^2/(c*n
+ d*n*x^n))))/d^3 + ((b*c - a*d)*(a*d*(-(B*c*(1 + m)) + A*d*(1 + m - n)) + b*c*(
-(A*d*(1 + m + n)) + B*c*(1 + m + 2*n)))*Hypergeometric2F1[1, (1 + m)/n, (1 + m
+ n)/n, -((d*x^n)/c)])/(c^2*d^3*(1 + m)*n))

_______________________________________________________________________________________

Maple [F]  time = 0.086, size = 0, normalized size = 0. \[ \int{\frac{ \left ( ex \right ) ^{m} \left ( a+b{x}^{n} \right ) ^{2} \left ( A+B{x}^{n} \right ) }{ \left ( c+d{x}^{n} \right ) ^{2}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((e*x)^m*(a+b*x^n)^2*(A+B*x^n)/(c+d*x^n)^2,x)

[Out]

int((e*x)^m*(a+b*x^n)^2*(A+B*x^n)/(c+d*x^n)^2,x)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ -{\left ({\left (b^{2} c^{2} d e^{m}{\left (m + n + 1\right )} + a^{2} d^{3} e^{m}{\left (m - n + 1\right )} - 2 \, a b c d^{2} e^{m}{\left (m + 1\right )}\right )} A -{\left (b^{2} c^{3} e^{m}{\left (m + 2 \, n + 1\right )} - 2 \, a b c^{2} d e^{m}{\left (m + n + 1\right )} + a^{2} c d^{2} e^{m}{\left (m + 1\right )}\right )} B\right )} \int \frac{x^{m}}{c d^{4} n x^{n} + c^{2} d^{3} n}\,{d x} + \frac{{\left (m n + n\right )} B b^{2} c d^{2} e^{m} x e^{\left (m \log \left (x\right ) + 2 \, n \log \left (x\right )\right )} +{\left ({\left ({\left (m^{2} + 2 \, m{\left (n + 1\right )} + n^{2} + 2 \, n + 1\right )} b^{2} c^{2} d e^{m} - 2 \,{\left (m^{2} + m{\left (n + 2\right )} + n + 1\right )} a b c d^{2} e^{m} +{\left (m^{2} + m{\left (n + 2\right )} + n + 1\right )} a^{2} d^{3} e^{m}\right )} A -{\left ({\left (m^{2} + m{\left (3 \, n + 2\right )} + 2 \, n^{2} + 3 \, n + 1\right )} b^{2} c^{3} e^{m} - 2 \,{\left (m^{2} + 2 \, m{\left (n + 1\right )} + n^{2} + 2 \, n + 1\right )} a b c^{2} d e^{m} +{\left (m^{2} + m{\left (n + 2\right )} + n + 1\right )} a^{2} c d^{2} e^{m}\right )} B\right )} x x^{m} +{\left ({\left (m n + n^{2} + n\right )} A b^{2} c d^{2} e^{m} -{\left ({\left (m n + 2 \, n^{2} + n\right )} b^{2} c^{2} d e^{m} - 2 \,{\left (m n + n^{2} + n\right )} a b c d^{2} e^{m}\right )} B\right )} x e^{\left (m \log \left (x\right ) + n \log \left (x\right )\right )}}{{\left (m^{2} n +{\left (n^{2} + 2 \, n\right )} m + n^{2} + n\right )} c d^{4} x^{n} +{\left (m^{2} n +{\left (n^{2} + 2 \, n\right )} m + n^{2} + n\right )} c^{2} d^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x^n + A)*(b*x^n + a)^2*(e*x)^m/(d*x^n + c)^2,x, algorithm="maxima")

[Out]

-((b^2*c^2*d*e^m*(m + n + 1) + a^2*d^3*e^m*(m - n + 1) - 2*a*b*c*d^2*e^m*(m + 1)
)*A - (b^2*c^3*e^m*(m + 2*n + 1) - 2*a*b*c^2*d*e^m*(m + n + 1) + a^2*c*d^2*e^m*(
m + 1))*B)*integrate(x^m/(c*d^4*n*x^n + c^2*d^3*n), x) + ((m*n + n)*B*b^2*c*d^2*
e^m*x*e^(m*log(x) + 2*n*log(x)) + (((m^2 + 2*m*(n + 1) + n^2 + 2*n + 1)*b^2*c^2*
d*e^m - 2*(m^2 + m*(n + 2) + n + 1)*a*b*c*d^2*e^m + (m^2 + m*(n + 2) + n + 1)*a^
2*d^3*e^m)*A - ((m^2 + m*(3*n + 2) + 2*n^2 + 3*n + 1)*b^2*c^3*e^m - 2*(m^2 + 2*m
*(n + 1) + n^2 + 2*n + 1)*a*b*c^2*d*e^m + (m^2 + m*(n + 2) + n + 1)*a^2*c*d^2*e^
m)*B)*x*x^m + ((m*n + n^2 + n)*A*b^2*c*d^2*e^m - ((m*n + 2*n^2 + n)*b^2*c^2*d*e^
m - 2*(m*n + n^2 + n)*a*b*c*d^2*e^m)*B)*x*e^(m*log(x) + n*log(x)))/((m^2*n + (n^
2 + 2*n)*m + n^2 + n)*c*d^4*x^n + (m^2*n + (n^2 + 2*n)*m + n^2 + n)*c^2*d^3)

_______________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \[{\rm integral}\left (\frac{{\left (B b^{2} x^{3 \, n} + A a^{2} +{\left (2 \, B a b + A b^{2}\right )} x^{2 \, n} +{\left (B a^{2} + 2 \, A a b\right )} x^{n}\right )} \left (e x\right )^{m}}{d^{2} x^{2 \, n} + 2 \, c d x^{n} + c^{2}}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x^n + A)*(b*x^n + a)^2*(e*x)^m/(d*x^n + c)^2,x, algorithm="fricas")

[Out]

integral((B*b^2*x^(3*n) + A*a^2 + (2*B*a*b + A*b^2)*x^(2*n) + (B*a^2 + 2*A*a*b)*
x^n)*(e*x)^m/(d^2*x^(2*n) + 2*c*d*x^n + c^2), x)

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((e*x)**m*(a+b*x**n)**2*(A+B*x**n)/(c+d*x**n)**2,x)

[Out]

Timed out

_______________________________________________________________________________________

GIAC/XCAS [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{{\left (B x^{n} + A\right )}{\left (b x^{n} + a\right )}^{2} \left (e x\right )^{m}}{{\left (d x^{n} + c\right )}^{2}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x^n + A)*(b*x^n + a)^2*(e*x)^m/(d*x^n + c)^2,x, algorithm="giac")

[Out]

integrate((B*x^n + A)*(b*x^n + a)^2*(e*x)^m/(d*x^n + c)^2, x)